package com.innerchic.huhu.bean;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * ================================================
 * 作    者：贾恒飞 >>> 17515250730@163.com
 * 项    目：watcher-demo
 * 日    期：2021/12/14 10:34
 * 包    名：com.innerchic.communication.bean
 * 描    述：网络请求提交数据对象
 * Create by zFox from AndroidStudio4.2
 * ================================================
 */
public class HttpJsonData {

    private String url;

    private JSONObject postParam;

    private long postTimes;

    public HttpJsonData(String url, JSONObject postParam) {
        this.url = url;
        this.postParam = postParam;
        this.postTimes = System.currentTimeMillis();
    }

    /**
     * 格式化Json数据
     */
    public static HttpJsonData format(String httpJsonData) {
        return JSON.parseObject(httpJsonData, HttpJsonData.class);
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public JSONObject getPostParam() {
        return postParam;
    }

    public void setPostParam(JSONObject postParam) {
        this.postParam = postParam;
    }

    public long getPostTimes() {
        return postTimes;
    }

    public void setPostTimes(long postTimes) {
        this.postTimes = postTimes;
    }
}
